package com.common.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {

    public static Date StringToDate(String date) {
        String dataFormat = "yyyy-MM-dd";
        SimpleDateFormat sdf = new SimpleDateFormat(dataFormat);
        Date parse = null;
        try {
            parse = sdf.parse(date);
        } catch (ParseException e) {
            e.printStackTrace();
        }

        return parse;
    }
}
